﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Net;

namespace WindowsFormsApplication1
{

    public partial class Form1 : Form
    {
        MyBot bot;

        public Form1()
        {
            InitializeComponent();
            //WebClient client = new WebClient();
            //Stream strm = client.OpenRead("http://forum.fregat.com/showthread.php?t=7547&page=1428");
            //StreamReader sr = new StreamReader(strm, Encoding.Default);
            //string line;
            //while ((line = sr.ReadLine()) != null)
            //{
            //listBox1.Items.Add(line);
            //}
            //strm.Close();
            bot = new MyBot("http://forum.fregat.com/", listBox1);
            bot.Login("rigiiboy", "r7aLofrp");
        }

        

        private void button1_Click(object sender, EventArgs e)
        {

            //codingMd5 co = new codingMd5();
            //co.login(@"http://forum.fregat.com/login.php?do=login", "rigiiboy", "r7aLofrp"); // include http and www (I don't have 10 forum posts) 

            //string cookie = co.Cookie;

            //listBox1.Items.Add(cookie);


            

            //bot.Login("rigiiboy", "r7aLofrp");

            
                bot.NewMessage("7547", "Тестовая отправка сообщения!!!");
                
                //MessageBox.Show("AllDone!!!");

                //statusTextBox.Text += ;
        }
              
    }
}
